package com.futureCloudMOM.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.futureCloudMOM.core.entity.FBaseEntity;
import com.futureCloudMOM.framework.dict.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Basic_Material", description = "物料管理")
@TableName(value = "Basic_Material")
public class BasicMaterial extends FBaseEntity implements Serializable {



    @NotBlank(message="[物料编码]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("物料编码")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "code")
    private String code;

    @NotBlank(message="[物料名称]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("物料名称")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "name")
    private String name;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("型号")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "model")
    private String model;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("规格")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "specification")
    private String specification;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("图号")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "figureNumber")
    private String figureNumber;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("备注")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "remark")
    private String remark;

    @ApiModelProperty("状态(字典Code: material_status )")
    @TableField(value = "status")
    @Dict(dictCode = "material_status")
    private Long status;

    @ApiModelProperty("物料类型ID")
    @TableField(value = "materialTypeID")
    //@Dict(dictCode = "id",dictTable = "Basic_MaterialType",dictText = "name")
    private Long materialTypeID;

    @ApiModelProperty("单位ID")
    @TableField(value = "unitID")
    private Long unitID;

    @ApiModelProperty("辅助单位ID")
    @TableField(value = "auxUnitId")
    private Long auxUnitId;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("单位换算关系")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "unitRelation")
    private String unitRelation;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("最小包装数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "minPackage")
    private BigDecimal minPackage;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("批量数量")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "batchQty")
    private BigDecimal batchQty;

    @ApiModelProperty("默认出库仓库")
    @TableField(value = "defaultOutWarehouseID")
    private Long defaultOutWarehouseID;

    @ApiModelProperty("默认出库库位")
    @TableField(value = "defaultOutWareAreaID")
    private Long defaultOutWareAreaID;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("打印模板")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "printModelId")
    private String printModelId;

    @ApiModelProperty("质检类型ID")
    @TableField(value = "qCTypeID")
    private Long qCTypeID;

    @ApiModelProperty("默认入库仓库")
    @TableField(value = "defaultInWarehouseID")
    private Long defaultInWarehouseID;

    @ApiModelProperty("默认入库库位")
    @TableField(value = "defaultInWareAreaID")
    private Long defaultInWareAreaID;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("最大安全库存")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "maxSafeStock")
    private String maxSafeStock;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("最小安全库存")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "minSafeStock")
    private String minSafeStock;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("缩略图ID")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "thumbnail")
    private String thumbnail;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("预留AVG字段")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "position")
    private String position;

    @ApiModelProperty("默认供应商")
    @TableField(value = "defaultSupplier")
    private Long defaultSupplier;

    @ApiModelProperty("配方ID")
    @TableField(value = "formulaId")
    private Long formulaId;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("长度")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "sizeLength")
    private String sizeLength;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("宽度")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "sizeWidth")
    private String sizeWidth;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("高度")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "sizeHeight")
    private String sizeHeight;

    @ApiModelProperty("是否开启物料码")
    @TableField(value = "isCodeFlag")
    private Long isCodeFlag;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("ERP物料ID")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "eRPId")
    private String eRPId;






    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("辅助属性")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "auxiliary")
    private String auxiliary;

}

